<?php
	if(count($_POST)>0)
	{
		$name=$_POST['name'];
		
		$AnHien=$_POST['AnHien'];
		
		$sql="insert into `category` values ('NULL','$name','$AnHien')";
		mysql_query($sql);
		header('location:?mod=category');
	}	

?>
<form name="form1" method="post" action="">
  <table width="800" border="1" style="width:400px;margin:auto">
    <caption>
      ADD CATEGORIES
    </caption>
      <a href="?mod=category">Back to Category</a>
    <tr>
      <th width="334" scope="row">Name</th>
      <td width="450"><label>
        <input name="name" type="text" id="name" size="40">
      </label></td>
    </tr>
    <tr>
      <th scope="row">Ẩn hiện</th>
      <td><label>
        <select name="AnHien" id="AnHien">
          <option value="1">Hiện</option>
          <option value="0">Ẩn</option>
        </select>
      </label></td>
    </tr>
    <tr>
      <th scope="row">&nbsp;</th>
      <td><label>
        <input type="reset" name="reset" id="submit" value="Nhập lại">
        <input type="submit" name="submit" id="submit" value="Thêm">
      </label></td>
    </tr>
  </table>
</form>
